<?php
//---------------------------------------------------------------------------------------------------------------------------
    require_once('../../../config.inc.php');
    //---------------------------------------------------------------------------------------------------
    include_once($config['app_dir'] . '/includes/editform.class.php');
    require_once($config['app_dir'] . '/classes/staff.class.php');

    $Staff = new objStaff($config['app_id']);
    if( 3!=$Staff->UserGroupID() ) die('You have not permission to see this page. ');//var_dump($Staff->UserGroupID());
    //------------------------------------------------------------------------------------------------------------------------
    $EditForm = new objEditForm();
    $EditForm->field_id = 'id';
    //----------------------------------------------------------------------------------------------
    $ParamsEdit = new objFormParams('get', 'language_');
    if( !$ParamsEdit->isEmpty() &&  $params_edit = $ParamsEdit->getAssocArray() )
        if( 'edit' == $params_edit['operation']) {
            $EditForm->field_value = $params_edit['id'];
        }
    //----------------------------------------------------------------------------------------------
    $EditForm->table = 'fa_language';
    $EditForm->Run();
	//----------------------------------------------------------------------------------------------
	$url_list="<a href='languages.php'>list</a>";

    $Page = new objTemplate();
    $Page->Assign('content', $EditForm->fetchForm('admins/lang/form_lang.tpl').'<br>'. $url_list);
	$Page->Display('admins/lang/page_lang.tpl');
//---------------------------------------------------------------------------------------------------------------------------
?>
